<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

#聊天页面
Route::rule('page/chat/box', 'index/chatBox');
Route::rule('page/service/index', 'index/serviceIndex');
Route::rule('page/chat/service', 'index/chatBoxService');

#websocket相关
Route::group("app/websocket", function () {
    #绑定client_id
    Route::post("test/bindClientId", 'api.TestWebSocket/bindClientId');
    #用户发送给客服
    Route::post("test/sendMessageToCustomerService", 'api.TestWebSocket/sendMessageToCustomerService');
    #客服发送给用户
    Route::post("test/replyMessageToUser", 'api.TestWebSocket/replyMessageToUser');
    #【详情】得到聊天记录（指定uid）
    Route::post("test/getMessageListByUid", 'api.TestWebSocket/getMessageListByUid');
    #【列表】得到聊天记录
    Route::post("test/getLastMessage", 'api.TestWebSocket/getLastMessage');
    #删除与指定用户的消息记录（所有消息）
    Route::post("test/deleteMessage", 'api.TestWebSocket/deleteMessage');
    #查询未读消息数量（用户）
    Route::post("test/getUnreadTotalByUid", 'api.TestWebSocket/getUnreadTotalByUid');

});
